if (animate) {
let [, naturalHeight] = this.actor.get_preferred_height(-1);
this.actor.height = 0;
- this.actor._arrowRotation = this._arrow.rotation_angle_z;
Tweener.addTween(this.actor,
- { _arrowRotation: targetAngle,
- height: naturalHeight,
+ { height: naturalHeight,
time: 0.25,
- onUpdate: () => {
- this._arrow.rotation_angle_z = this.actor._arrowRotation;
- },
onComplete: () => {
this.actor.set_height(-1);
}
});
+ Tweener.addTween(this._arrow,
+ { rotation_angle_z: targetAngle,
+ time: 0.25 });
} else {
this._arrow.rotation_angle_z = targetAngle;
}
animate = false;
if (animate) {
- this.actor._arrowRotation = this._arrow.rotation_angle_z;
Tweener.addTween(this.actor,
- { _arrowRotation: 0,
- height: 0,
+ { height: 0,
time: 0.25,
- onUpdate: () => {
- this._arrow.rotation_angle_z = this.actor._arrowRotation;
- },
onComplete: () => {
this.actor.hide();
this.actor.set_height(-1);
},
});
+ Tweener.addTween(this._arrow,
+ { rotation_angle_z: 0,
+ time: 0.25 });
} else {
this._arrow.rotation_angle_z = 0;
this.actor.hide();